<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>尺米单词</title>
    <style>
        header img{
            width: 100%;
            height: 100%;
        }
       
        html,body{
                background-image :url(../static/images/page2.1.jpg);
                /* 图片铺满整个背景 */
                background-size: 100% auto;
                background-repeat: no-repeat;
				margin:0;
				padding:0;
			}
        input{
            width: 300px;
            height: 100px;
        }
        main{
            display: flex;
            justify-content: space-around;
            margin-top: 110px;
        }
    </style>
    <script>
        window.onload = function(){
            var img = document.getElementById("img");
            var imgArr = ["../static/images/page2.2.jpg","../static/images/page2.3.jpg"];
            var index = 0;
           console.log(img);
           console.log(imgArr[index])
            function changePic(){
                img.src = imgArr[index];
                index++;
                console.log(index)
                if(index>1){
                    index = 0;
                }
            }
            var button = document.getElementById("button");
            //button.onclick = changePic;
            setInterval(changePic,3000);

        }
    </script>
</head>
<body>
    <header>
        <img  id ="img" src="../static/images/page2.2.jpg">
    </header>
    <main>
       <input type="image" name="btn" src="../static/images/page2.4.png" onclick="window.location='http://42.193.148.6:9000/testWord'">
       <input type="image" name="btn" src="../static/images/page2.5.png" onclick="window.location='http://42.193.148.6:9000/WordBrowsing'">
       <input type="image" name="btn" src="../static/images/page2.6.png" onclick="window.location='http://42.193.148.6:9000/LimitDance'">
    </main>
    <!-- <input type="button" value="点我" id="button"> -->
    
            
        
    
</body>
</html>